package com.greyu.ysj.entity;

import java.io.Serializable;

/**
 * @author 
 */
public class CbtAsset implements Serializable {
    private Integer id;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 用户资产
     */
    private Double asset;

    /**
     * 是否冻结
     */
    private Boolean freezeFlag;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Double getAsset() {
        return asset;
    }

    public void setAsset(Double asset) {
        this.asset = asset;
    }

    public Boolean getFreezeFlag() {
        return freezeFlag;
    }

    public void setFreezeFlag(Boolean freezeFlag) {
        this.freezeFlag = freezeFlag;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CbtAsset other = (CbtAsset) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getAsset() == null ? other.getAsset() == null : this.getAsset().equals(other.getAsset()))
            && (this.getFreezeFlag() == null ? other.getFreezeFlag() == null : this.getFreezeFlag().equals(other.getFreezeFlag()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getAsset() == null) ? 0 : getAsset().hashCode());
        result = prime * result + ((getFreezeFlag() == null) ? 0 : getFreezeFlag().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", asset=").append(asset);
        sb.append(", freezeFlag=").append(freezeFlag);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}